<template>
  <h2>Home</h2>
  <div>
    <button @click="router.push({name:'Play',params:{id:1}})">娱乐</button>
    <button @click="router.push('/home/music')">音乐</button>
  </div>
  <div>
    <router-link to="/home/music">
      <button>音乐</button>
    </router-link>
    <router-link to="/home/play">
      <button>娱乐</button>
    </router-link>
  </div>
  <router-view></router-view>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "Home",
});
</script>

<script setup lang="ts">
  import { useRoute,useRouter } from 'vue-router';
  const route = useRoute();
  const router = useRouter();
</script>

<style  scoped lang="scss">
  
</style>